import request from '@/utils/request'
import { planProducer } from '../config'
let apiUrl = planProducer.startsWith('/') ? planProducer : ('/' + planProducer)// + '-lzh'

/**
 * 分页查询
 * @param data
 */
export function getPlanExamineList(data) {
    return request({
        url: apiUrl + '/planExamine/getPagePlanExamine',
        method: 'post',
        data: data
    })
}

/**
 * 添加项目策划考核-主表
 * @param data
 */
export function addPlanExamine(data) {
    return request({
        url: apiUrl + '/planExamineCommon/addPlanExamine',
        method: 'post',
        data
    })
}

/**
 * 通过id查询详情
 * @param data
 */
export function queryPlanExamineById(data) {
    return request({
        url: apiUrl + '/planExamineCommon/queryPlanExamineById?id=' + data,
        method: 'post',
        // data
    })
}

/**
 * 通过id修改项目策划考核数据
 * @param data
 */
export function updatePlanExamine(data) {
    return request({
        url: apiUrl + '/planExamineCommon/updatePlanExamine',
        method: 'post',
        data
    })
}

/**
 * 删除项目策划考核数据
 * @param data
 */
export function deletePlanExamine(data) {
    return request({
        url: apiUrl + '/planExamineCommon/deletePlanExamine?id=' + data,
        method: 'post',
        // data
    })
}

/**
 * 导出项目策划考核数据/excel
 * @param data
 */
export function getPlanExamineExcel() {
   return {
     server: apiUrl,
     url: '/planExamineCommon/getPlanExamineExcel'
   }
}

/**
 * 发起项目策划考核审批，发起项目策划考核审批
 * @param data
 */
export function addPlanExamineProcess(id) {
   return request({
       url: apiUrl + '/planExamineCommon/addPlanExamineProcess/' + id,
       method: 'get',
   })
}

/**
 * 获取项目策划的相关值，获取项目策划的相关值
 * @param data
 */
export function getPlanValues(data, id) {
   return request({
       url: apiUrl + '/planExamineCommon/getPlanValues/' + id,
       method: 'post',
       data
   })
}

/**
 * 月度汇总分页查询
 * @param data
 */
export function getPagePlanExamineMonth(data) {
    return request({
        url: apiUrl + '/planExamineMonth/getPagePlanExamineMonth',
        method: 'post',
        data: data
    })
}

/**
 * 查询项目策划考核月度汇总数据
 * @param data
 */
export function getPlanMonthExamineById(data) {
    return request({
        url: apiUrl + '/planExamineMonthCommon/getPlanMonthExamineById?id=' + data,
        method: 'post',
        // data: data
    })
}

/**
 * 编辑项目策划考核月度汇总数据
 * @param data
 */
export function updatePlanMonthExamine(data) {
    return request({
        url: apiUrl + '/planExamineMonthCommon/updatePlanMonthExamine',
        method: 'post',
        data: data
    })
}

/**
 * 发起项目策划考核月度汇总审批
 * @param data
 */
export function addPlanExamineMonthProcess(id) {
    return request({
        url: `${apiUrl}/planExamineMonthCommon/addPlanExamineMonthProcess/${id}`,
        method: 'get',
    })
}

/**
 * 导出项目策划考核月度汇总数据/excel
 * @param data
 */
export function getPlanExamineMonthExcel() {
   return {
     server: apiUrl,
     url: '/planExamineMonthCommon/getPlanExamineMonthExcel'
   }
}

/**
 * 季度汇总分页查询
 * @param data
 */
export function getPagePlanExamineQuarter(data) {
    return request({
        url: apiUrl + '/planExamineQuarter/getPagePlanExamineQuarter',
        method: 'post',
        data: data
    })
}

/**
 * 获取项目策划季度考核汇总明细表信息
 * @param data
 */
export function getPlanExamineQuarterById(data) {
    return request({
        url: apiUrl + '/planExamineQuarter/getPlanExamineQuarterById?id=' + data,
        method: 'get',
        // data: data
    })
}
/**
 * 导出项目策划考核季度汇总数据/excel
 * @param data
 */
export function getPlanExamineQuarterExcel() {
   return {
     server: apiUrl,
     url: '/planExamineQuarter/getPlanExamineQuarterExcel'
   }
}

/**
 * 获取点击节点的详细信息列表
 * @param data
 */
 export function planExamineCommonGetNodeDetailList(data) {
    return request({
        url: apiUrl + '/planExamineCommon/getNodeDetailList',
        method: 'post',
        data: data
    })
}
/**
 * 策划执行书月度考核信息
 * @param data
 */
export function getPlanExamineMonthDetail(data) {
    return request({
        url: apiUrl + '/planExamineMonthCommon/getPlanExamineMonthDetail',
        method: 'post',
        data: data
    })
}

/**
 * 策划执行书月度考核信息
 * @param data
 */
export function getPlanExamineMonthCount(data) {
    return request({
        url: apiUrl + '/planExamineMonthCommon/getPlanExamineMonthCount',
        method: 'post',
        data: data
    })
}

/**
 * 导出策划执行书月度考核汇总
 * @param data
 */
export function planExamineMonthCommonExport(data) {
    return request({
        url: apiUrl + '/planExamineMonthCommon/export',
        method: 'post',
        data: data,
        responseType: 'blob'
    })
}

/**
 * 导出策划执行书月度考核汇总
 * @param data
 */
export function planExamineMonthCommonGetNodeInfoList(data) {
    return request({
        url: apiUrl + '/planExamineMonthCommon/getNodeInfoList',
        method: 'post',
        data: data
    })
}








